{include file = $admin_header1}
{include file = $admin_header2}
{include file = $admin_leftsidebar}

{strip}
<script type="text/javascript" src="{$siteroot}/js/thick_js/thickbox.js"></script>
<script type="text/javascript" src="{$siteroot}/js/ajax_page_url.js"></script>
<link rel="stylesheet" href="{$siteroot}/templates/{$templatedir}/css/thickbox_user.css" type="text/css" media="screen" />
{/strip}
{literal}
<script type="text/javascript">
$(document).ready(function()
{
$("#checkall").click(function()
 	{
		var checked_status = this.checked;
		$("input[@type=checkbox]").each(function()
		{
			this.checked = checked_status;
			change(this);
		});
 	});
	$("input[@type=checkbox]").click(function()
 	{
		change(this);
 	});
function change(chk)
	{
		var $tr = $(chk).parent().parent();
		if($tr.attr('id'))
		{
			if($tr.attr('class')=='selectedrow' && !chk.checked)
				$tr.removeClass('selectedrow').addClass('grayback');
			else
				$tr.removeClass('grayback').addClass('selectedrow');
		}
	}

$("#checkall").click(function()
 	{
		var checked_status = this.checked;
		$("input[@type=checkbox]").each(function()
		{
			this.checked = checked_status;
			change(this);
		});
 	});
	$("input[@type=checkbox]").click(function()
 	{
		change(this);
 	});
function change(chk)
	{
		var $tr = $(chk).parent().parent();
		if($tr.attr('id'))
		{
			if($tr.attr('class')=='selectedrow' && !chk.checked)
				$tr.removeClass('selectedrow').addClass('grayback');
			else
				$tr.removeClass('grayback').addClass('selectedrow');
		}
	}
$("#msg").fadeOut(5000);
});
</script>
{/literal}
<!--middel panel starts -->
<div class="middel_panel">
<div class="breadcrumb"><a href="{$site_path}/admin/blog/">Blog </a>&nbsp;&gt;&nbsp;View Blog</div>
{if $msg_success}<div align="center" id="msg" class="successMsg">{$msg_success}</div>{/if}
	<div class="holdthisTop">
		<div name="frmAction" method="post" action="" id="frmAction">
		<table width="100%" cellspacing="0" cellpadding="0" border="0">
		<input type="hidden" id="blogid" value="{$smarty.get.blogid}" />
		<input type="hidden" id="sorttype" value="" />
		<input type="hidden" id="sortord" value="" />
		<div align="right"><a href="{$site_path}/admin/blog/view_blogs"><< Back To Blog</a></div>
		<tr>
			<td>
			<table>
				<tr>
				<td valign="top"><img src="{$site_mount_path}/BlogImages/{$blog->getThumbnail()}" height="90px" width="90px" ></td>
               	<td>&nbsp;&nbsp;&nbsp;</td>
                 </tr>
				<td valign="top">
				<table>
					<tr>
						<td align="left"><strong>{$blog->getTitle()|ucfirst}</strong></td>
					</tr>
                                	<!--<tr>
						<td colspan="2"><span class="strong">Description : </span></td>
					</tr>-->
					<tr align="center">
						<td align="left">{$blog->getDescription()|ucfirst}</td>
					</tr>
				</table>
			</td>
			</tr>	
			</table>
			</td>
		</tr>
		
		<tr>
			<td>
			<img src="{$site_images_path}/icons/add.png" align="top"  alt="add" />&nbsp; 
			<a href="{$site_path}/admin/comment/add_edit_comment/blog_id/{$blog->getId()}"> Add Comment</a>
			</td>
		</tr>
		<br/>
		
		</table>
		<div id="ReplyDiv">
		<table width="100%" cellspacing="0" cellpadding="0">
	        <input type="hidden" name="hiddenvalue" id="hiddenvalue" value="{$hidden_user_sort_by}">
	        <tr>
                    <td width="100%" valign="top" align="center" colspan="2">
 				    <form name="frmAction" method="post" action="{$site_path}/admin/comment/update_comment_action" id="frmAction">
					   <input type="hidden" id="sorttype" value="" />
						<input type="hidden" id="sortord" value="" />
		
	<table width="100%"  border="0" cellpadding="0" cellspacing="0" class="datagrid">

					<tr class="headbg">
						<td width="1%" align="center"><input type="checkbox" id="checkall" /></td>
						<th width="32%"><a href="{sortorder sorttype='title' sortord=$ord}"> Posted By</a></th>
					<th width="32%"><a href="{sortorder sorttype='module' sortord=$ord}"> Comment</a></th>
					<th width="32%" align="center"><a href="{sortorder sorttype='module' sortord=$ord}"> Action</a></th>
					
					</tr>
					{if 0 lt $comments|@count}
         			{foreach item=comment from=$comments}
         				<tr class="grayback" id="tr_{$comment->getId()}">
							<td align="center" valign="top"><input type="checkbox" name="comment[id][]" value="{$comment->getId()}" /></td>
							<td align="left" valign="top">{$comment->getCreatedOn()|date_format:"%Y-%m-%d"}</td>
							<td align="left" valign="top">{$comment->getComment()|ucfirst|truncate:50:""}</td>
							
							<td align="center" valign="top"><img src="{$site_images_path}/icons/application_edit.png" align="top" alt="" /> <a href="{$site_path}/admin/comment/add_edit_comment/id/{$comment->getId()}" class="admintxt"><strong>Edit</strong></a></td>
						</tr>
					{/foreach}
						<tr>
							<td colspan="4">
								<strong>{$mesg}</strong>
							</td>
						</tr>
					{/if}
					<tr>
					<td align="right"><img src="{$site_images_path}/admin/arrow_ltr.gif" alt="" /></td>
					<td colspan="3" align="left">
						<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tr>
							<td width="10%">
								<select name="comment[action]" id="action">
									<option value="">--Action--</option>
									<option value="delete">Delete</option>
								</select>
							</td>
							<td align="left" width="6%"><span class="buttons"><input type="submit" name="submit" id="submit" value="Go" /></span></td>
						<td><span id="acterr" class="error"></span></td><td colspan="3" align="right">{if $pgnation}{$pgnation}{/if}</td>
					</tr>					
				</table>
			            </td>
					</tr>
                                </table>
                            </form>
                        </td>
                    </tr>
                </table>
		</div>
<!--{if $pgnation}
<div class="pagination">
	<div class="tabpaging leftfloat">
		{$pgnation}
	</div>
</div>
{/if}-->
			</form>
		</div>
		</div>
	<!--middel panel ends -->
</div>
                  <!--main content ends -->
                  <!--content ends -->
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      </div>
    </div>

    <!--Banner ends -->
  </div>

  <!--    content area ends -->
<!--<script type="text/javascript">searchUser({$smarty.get.page});</script>-->
{include file = $admin_footer}